/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam - Plugin															/
/	Created by:		broadcastweb.eu - Paules												/
/	Site:			http://www.broadcastweb.eu												/
/	Email:			support@broadcastweb.eu													/
/	Support:		http://broadcastweb.eu													/
/	Copyright:		2011 - 2012 (c) Broadcasteb.eu											/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0006																	/
/																							/
/========================================== JooSam ========================================*/
var joosam = {
	/*==========================================================================================/
	/	Type:		Global variables used in all function										/
	/	Version:	0002																		/
	/==========================================================================================*/
	// GLOBAL
	conf_nr: 1000000000,
	conf_form: "jsm_form",
	conf_validate: "jsm_hidden_validate",
	conf_pageload: "jsm_hidden_pageload",
	conf_songid: "jsm_hidden_songid",
	conf_searchtype: "jsm_hidden_searchtype",
	conf_searchdata: "jsm_hidden_searchdata",
	conf_pagenum: "jsm_hidden_pagenum",
	conf_task: "jsm_hidden_task",
	conf_pageconf: "jsm_hidden_pageconf",
	conf_language: "jsm_hidden_language",
	conf_searchinput: "jsm_search_box",
	// EVENT VARS
	data_event_title: "",
	data_event_content: "",
	// LIVE MODULE VARS
	data_live_artist: "",
	data_live_title: "",
	data_live_timer: "",
	data_live_image: "",
	data_live_songid: "",
	data_live_req_id: "",
	data_live_req_name: "",
	data_live_req_msg: "",
	// QUEUE MODULE VARS
	data_queue_songA_id: "",
	data_queue_songA_artist: "",
	data_queue_songA_title: "",
	data_queue_songB_id: "",
	data_queue_songB_artist: "",
	data_queue_songB_title: "",
	data_queue_songC_id: "",
	data_queue_songC_artist: "",
	data_queue_songC_title: "",
	data_queue_songD_id: "",
	data_queue_songD_artist: "",
	data_queue_songD_title: "",
	data_queue_songE_id: "",
	data_queue_songE_artist: "",
	data_queue_songE_title: "",
	data_queue_songF_id: "",
	data_queue_songF_artist: "",
	data_queue_songF_title: "",
	// HISTORY MODULE VARS
	data_history_maxsongs: 2,
	data_history_songA_id: "",
	data_history_songA_artist: "",
	data_history_songA_title: "",
	data_history_songA_played: "",
	data_history_songB_id: "",
	data_history_songB_artist: "",
	data_history_songB_title: "",
	data_history_songB_played: "",
	data_history_songC_id: "",
	data_history_songC_artist: "",
	data_history_songC_title: "",
	data_history_songC_played: "",
	data_history_songD_id: "",
	data_history_songD_artist: "",
	data_history_songD_title: "",
	data_history_songD_played: "",
	data_history_songE_id: "",
	data_history_songE_artist: "",
	data_history_songE_title: "",
	data_history_songE_played: "",
	data_history_songF_id: "",
	data_history_songF_artist: "",
	data_history_songF_title: "",
	data_history_songF_played: "",
	data_history_songG_id: "",
	data_history_songG_artist: "",
	data_history_songG_title: "",
	data_history_songG_played: "",
	data_history_songH_id: "",
	data_history_songH_artist: "",
	data_history_songH_title: "",
	data_history_songH_played: "",
	data_history_songI_id: "",
	data_history_songI_artist: "",
	data_history_songI_title: "",
	data_history_songI_played: "",
	data_history_songJ_id: "",
	data_history_songJ_artist: "",
	data_history_songJ_title: "",
	data_history_songJ_played: "",
	// TOP-REQUEST MODULE VARS
	data_top_songA_id: "",
	data_top_songA_artist: "",
	data_top_songA_title: "",
	data_top_songB_id: "",
	data_top_songB_artist: "",
	data_top_songB_title: "",
	data_top_songC_id: "",
	data_top_songC_artist: "",
	data_top_songC_title: "",
	data_top_songD_id: "",
	data_top_songD_artist: "",
	data_top_songD_title: "",
	data_top_songE_id: "",
	data_top_songE_artist: "",
	data_top_songE_title: "",
	data_top_songF_id: "",
	data_top_songF_artist: "",
	data_top_songF_title: "", 
	/*==========================================================================================/
	/	Function:	getNum																		/
	/	Used:		Create random numbers to prevent browser cache by XMLHttpRequest			/
	/				GET method.																	/
	/	Version:	0001																		/
	/==========================================================================================*/
	getNum: function(type){ var nr = this.conf_nr; var result; if(type == 'random'){ result = Math.floor(Math.random()*nr); } else{ result = nr; } return result; },
	/*==========================================================================================/
	/	Function:	ajax_init																	/
	/	Used:		Create ajax object for other function										/
	/	Version:	0001																		/
	/==========================================================================================*/
	ajax_init: function(){var req; if(window.XMLHttpRequest){req = new XMLHttpRequest(); }else if(window.ActiveXObject){ req = new ActiveXObject("Microsoft.XMLHTTP");}else{ alert('Browser error: No Ajax Support'); req = false; } return req; },
	/*==========================================================================================/
	/	Function:	ajax_search																	/
	/	Used:		Search function for joosam component										/
	/	Version:	0001																		/
	/==========================================================================================*/
	ajax_search: function(url, method, target, tagname, countmin, evt){
		var searchdiv = document.getElementById('joosam_search');
		if(searchdiv){ var pardiv = searchdiv.getParent(); pardiv.removeChild(searchdiv); }
		var searchbox = document.getElementById(this.conf_searchinput);
		var searchvalue = searchbox.value;
		if(searchvalue.length >= countmin){
			if(method != 'POST' && method != 'GET'){method = 'GET';}
			var http = this.ajax_init();
			var url = url+"&data="+searchvalue+"&rnum="+this.getNum('random');
			var xml; var txt;
			http.onreadystatechange=function(){
				if(http.readyState==4 && http.status==200){
					xml = http.responseXML;
					var sqldata = "";
					var x = xml.getElementsByTagName(tagname);
					var firstID = x[0].attributes.getNamedItem("songid").value;
					if(firstID == "ERROR"){
						var msg = x[0].attributes.getNamedItem("msg").value;
						sqldata = "<li>"+msg+"</li>";
					} else{
						for(i=0;i<x.length;i++){
							var songid=x[i].attributes.getNamedItem("songid").value;
							var title=x[i].attributes.getNamedItem("title").value;
							var artist=x[i].attributes.getNamedItem("artist").value;
							sqldata = sqldata+'<li class="joosam_search_li" onclick="joosam.gosong(\''+songid+'\')"><span class="joosam_search_li_artist">'+artist+'</span>, <span class="joosam_search_li_title">'+title+'</span></li>';
						}
					}
					var searchbox = document.getElementById(joosam.conf_searchinput);
					var fromleft = searchbox.offsetLeft;
					var joosam_search = document.createElement('ul');
					joosam_search.setAttribute('id', 'joosam_search');
					joosam_search.setAttribute('style', 'left:'+fromleft+'px;');
					joosam_search.innerHTML = sqldata;
					document.getElementById(target).appendChild(joosam_search);
				}
			}
			http.open(method, url, true);
			http.send();
		}
	},
	/*==========================================================================================/
	/	Function:	getData																		/
	/	Used:		Load data from joosam xml file for all modules								/
	/	Version:	0001																		/
	/==========================================================================================*/
	getData: function(url){
		var method = "GET";
		var host = url+"&rnum="+this.getNum('random');
		var tagname = "joosam";
		var http = this.ajax_init();
		http.onreadystatechange=function(){
			if(http.readyState==4 && http.status==200){
				var xml = http.responseXML;
				var x = xml.getElementsByTagName(tagname)[0];
				/*== DATA MOD_JOOSAM_EVENT ==*/
				var events = x.getElementsByTagName("event")[0];
				joosam.data_event_title = events.getElementsByTagName("title")[0].childNodes[0].nodeValue;
				joosam.data_event_content = events.getElementsByTagName("content")[0].childNodes[0].nodeValue;
				/*== DATA MOD_JOOSAM_TOPREQUEST ==*/
				var topreq = x.getElementsByTagName("topdata")[0];
				var top_songA = topreq.getElementsByTagName("song")[0];
				var top_songB = topreq.getElementsByTagName("song")[1];
				var top_songC = topreq.getElementsByTagName("song")[2];
				var top_songD = topreq.getElementsByTagName("song")[3];
				var top_songE = topreq.getElementsByTagName("song")[4];
				var top_songF = topreq.getElementsByTagName("song")[5];
				if(top_songA){
					if(top_songA.getElementsByTagName("songid")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songA_id = top_songA.getElementsByTagName("songid")[0].childNodes[0].nodeValue;	}
					if(top_songA.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songA_artist = top_songA.getElementsByTagName("artist")[0].childNodes[0].nodeValue; }
					if(top_songA.getElementsByTagName("title")[0].childNodes[0].nodeValue){
						joosam.data_top_songA_title = top_songA.getElementsByTagName("title")[0].childNodes[0].nodeValue; }
				} if(top_songB){
					if(top_songB.getElementsByTagName("songid")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songB_id = top_songB.getElementsByTagName("songid")[0].childNodes[0].nodeValue; }
					if(top_songB.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songB_artist = top_songB.getElementsByTagName("artist")[0].childNodes[0].nodeValue; }
					if(top_songB.getElementsByTagName("title")[0].childNodes[0].nodeValue){
						joosam.data_top_songB_title = top_songB.getElementsByTagName("title")[0].childNodes[0].nodeValue; }
				} if(top_songC){
					if(top_songC.getElementsByTagName("songid")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songC_id = top_songC.getElementsByTagName("songid")[0].childNodes[0].nodeValue; }
					if(top_songC.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songC_artist = top_songC.getElementsByTagName("artist")[0].childNodes[0].nodeValue; }
					if(top_songC.getElementsByTagName("title")[0].childNodes[0].nodeValue){
						joosam.data_top_songC_title = top_songC.getElementsByTagName("title")[0].childNodes[0].nodeValue; }
				} if(top_songD){
					if(top_songD.getElementsByTagName("songid")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songD_id = top_songD.getElementsByTagName("songid")[0].childNodes[0].nodeValue; }
					if(top_songD.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songD_artist = top_songD.getElementsByTagName("artist")[0].childNodes[0].nodeValue; }
					if(top_songD.getElementsByTagName("title")[0].childNodes[0].nodeValue){
						joosam.data_top_songD_title = top_songD.getElementsByTagName("title")[0].childNodes[0].nodeValue; }
				} if(top_songE){
					if(top_songE.getElementsByTagName("songid")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songE_id = top_songE.getElementsByTagName("songid")[0].childNodes[0].nodeValue; }
					if(top_songE.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songE_artist = top_songE.getElementsByTagName("artist")[0].childNodes[0].nodeValue; }
					if(top_songE.getElementsByTagName("title")[0].childNodes[0].nodeValue){
						joosam.data_top_songE_title = top_songE.getElementsByTagName("title")[0].childNodes[0].nodeValue; }
				} if(top_songF){
					if(top_songF.getElementsByTagName("songid")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songF_id = top_songF.getElementsByTagName("songid")[0].childNodes[0].nodeValue; }
					if(top_songF.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_top_songF_artist = top_songF.getElementsByTagName("artist")[0].childNodes[0].nodeValue; }
					if(top_songF.getElementsByTagName("title")[0].childNodes[0].nodeValue){
						joosam.data_top_songF_title = top_songF.getElementsByTagName("title")[0].childNodes[0].nodeValue; }
				}
				/*== DATA MOD_JOOSAM_LIVE ==*/
				var live = x.getElementsByTagName("livedata")[0];
				if(live.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
					joosam.data_live_artist = live.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
				} else{ joosam.data_live_artist = ''; }
				if(live.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
					joosam.data_live_title = live.getElementsByTagName("title")[0].childNodes[0].nodeValue;
				} else{ joosam.data_live_title = ''; }
				joosam.data_live_timer = live.getElementsByTagName("duration")[0].childNodes[0].nodeValue;
				joosam.data_live_image = live.getElementsByTagName("picture")[0].childNodes[0].nodeValue;
				joosam.data_live_req_id = live.getElementsByTagName("requestid")[0].childNodes[0].nodeValue;				
				joosam.data_live_req_name = live.getElementsByTagName("requestname")[0].childNodes[0].nodeValue;
				joosam.data_live_req_msg = live.getElementsByTagName("requestmsg")[0].childNodes[0].nodeValue;
				joosam.data_live_songid = live.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
				/*== DATA MOD_JOOSAM_HISTORY ==*/
				var histor = x.getElementsByTagName("historydata")[0];
				var histor_songA = histor.getElementsByTagName("song")[0];
				var histor_songB = histor.getElementsByTagName("song")[1];
				var histor_songC = histor.getElementsByTagName("song")[2];
				var histor_songD = histor.getElementsByTagName("song")[3];
				var histor_songE = histor.getElementsByTagName("song")[4];
				var histor_songF = histor.getElementsByTagName("song")[5];
				var histor_songG = histor.getElementsByTagName("song")[6];
				var histor_songH = histor.getElementsByTagName("song")[7];
				var histor_songI = histor.getElementsByTagName("song")[8];
				var histor_songJ = histor.getElementsByTagName("song")[9];
				if(histor_songA){
					joosam.data_history_songA_id = histor_songA.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songA.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songA_artist = histor_songA.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songA_artist = ''; }
					if(histor_songA.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songA_title = histor_songA.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songA_title = ''; }
					joosam.data_history_songA_played = histor_songA.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songB){
					joosam.data_history_songB_id = histor_songB.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songB.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songB_artist = histor_songB.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songB_artist = ''; }
					if(histor_songB.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songB_title = histor_songB.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songB_title = ''; }
					joosam.data_history_songB_played = histor_songB.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songC){
					joosam.data_history_songC_id = histor_songC.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songC.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songC_artist = histor_songC.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songC_artist = ''; }
					if(histor_songC.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songC_title = histor_songC.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songC_title = ''; }
					joosam.data_history_songC_played = histor_songC.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songD){
					joosam.data_history_songD_id = histor_songD.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songD.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songD_artist = histor_songD.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songD_artist = ''; }
					if(histor_songD.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songD_title = histor_songD.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songD_title = ''; }
					joosam.data_history_songD_played = histor_songD.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songE){
					joosam.data_history_songE_id = histor_songE.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songE.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songE_artist = histor_songE.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songE_artist = ''; }
					if(histor_songE.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songE_title = histor_songE.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songE_title = ''; }
					joosam.data_history_songE_played = histor_songE.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songF){
					joosam.data_history_songF_id = histor_songF.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songF.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songF_artist = histor_songF.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songF_artist = ''; }
					if(histor_songF.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songF_title = histor_songF.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songF_title = ''; }
					joosam.data_history_songF_played = histor_songF.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songG){
					joosam.data_history_songG_id = histor_songG.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songG.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songG_artist = histor_songG.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songG_artist = ''; }
					if(histor_songG.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songG_title = histor_songG.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songG_title = ''; }
					joosam.data_history_songG_played = histor_songG.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songH){
					joosam.data_history_songH_id = histor_songH.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songH.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songH_artist = histor_songH.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songH_artist = ''; }
					if(histor_songH.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songH_title = histor_songH.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songH_title = ''; }
					joosam.data_history_songH_played = histor_songH.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songI){
					joosam.data_history_songI_id = histor_songI.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songI.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songI_artist = histor_songI.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songI_artist = ''; }
					if(histor_songI.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songI_title = histor_songI.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songI_title = ''; }
					joosam.data_history_songI_played = histor_songI.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				if(histor_songJ){
					joosam.data_history_songJ_id = histor_songJ.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(histor_songJ.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songJ_artist = histor_songJ.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songJ_artist = ''; }
					if(histor_songJ.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_history_songJ_title = histor_songJ.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_history_songJ_title = ''; }
					joosam.data_history_songJ_played = histor_songJ.getElementsByTagName("played")[0].childNodes[0].nodeValue; }
				/*== DATA MOD_JOOSAM_QUEUE ==*/
				var queue = x.getElementsByTagName("queue")[0];
				var queue_songA = queue.getElementsByTagName("song")[0];
				var queue_songB = queue.getElementsByTagName("song")[1];
				var queue_songC = queue.getElementsByTagName("song")[2];
				var queue_songD = queue.getElementsByTagName("song")[3];
				var queue_songE = queue.getElementsByTagName("song")[4];
				var queue_songF = queue.getElementsByTagName("song")[5];
				if(queue_songA){
					joosam.data_queue_songA_id = queue_songA.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(queue_songA.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songA_artist = queue_songA.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songA_artist = ''; }
					if(queue_songA.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songA_title = queue_songA.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songA_title = ''; }
				} if(queue_songB){
					joosam.data_queue_songB_id = queue_songB.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(queue_songB.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songB_artist = queue_songB.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songB_artist = ''; }
					if(queue_songB.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songB_title = queue_songB.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songB_title = ''; }
				} if(queue_songC){
					joosam.data_queue_songC_id = queue_songC.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(queue_songC.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songC_artist = queue_songC.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songC_artist = ''; }
					if(queue_songC.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songC_title = queue_songC.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songC_title = ''; }
				} if(queue_songD){
					joosam.data_queue_songD_id = queue_songD.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(queue_songD.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songD_artist = queue_songD.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songD_artist = ''; }
					if(queue_songD.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songD_title = queue_songD.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songD_title = ''; }
				} if(queue_songE){
					joosam.data_queue_songE_id = queue_songE.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(queue_songE.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songE_artist = queue_songE.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songE_artist = ''; }
					if(queue_songE.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songE_title = queue_songE.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songE_title = ''; }
				} if(queue_songF){
					joosam.data_queue_songF_id = queue_songF.getElementsByTagName("songid")[0].childNodes[0].nodeValue;
					if(queue_songF.getElementsByTagName("artist")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songF_artist = queue_songF.getElementsByTagName("artist")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songF_artist = ''; }
					if(queue_songF.getElementsByTagName("title")[0].childNodes[0].nodeValue != 'jsm_false'){
						joosam.data_queue_songF_title = queue_songF.getElementsByTagName("title")[0].childNodes[0].nodeValue;
					} else{ joosam.data_queue_songF_title = ''; }
				} setTimeout('joosam.getData("'+url+'")', 5000);
			}
		}
		http.open(method, url, true);
		http.send();
	},
	/*==========================================================================================/
	/	Function:	countdown																	/
	/	Used:		Count down timer for joosam live module										/
	/	Version:	0001																		/
	/==========================================================================================*/
	countdown: function(){ var timer = this.data_live_timer; if(timer == ''){ this.data_live_timer = 0; } else{ this.data_live_timer = timer - 1; } setTimeout('joosam.countdown()', 1000); },
	/*==========================================================================================/
	/	Function:	ajax_event																	/
	/	Used:		Create output for JooSam Event module										/
	/	Version:	0001																		/
	/==========================================================================================*/
	ajax_event: function(target, reset){
		var title = '<h3>'+this.data_event_title+'</h3>';
		var contentf = this.data_event_content;
		var html = title+contentf;
		document.getElementById(target).innerHTML = html;
		setTimeout('joosam.ajax_event("'+target+'", "'+reset+'")', reset);
	},
	/*==========================================================================================/
	/	Function:	ajax_toprequest																/
	/	Used:		Create output for JooSam TopRequest module									/
	/	Version:	0001																		/
	/==========================================================================================*/
	ajax_toprequest: function(target, reset, maxsongs_toprequest){
		if(maxsongs_toprequest == undefined){
			maxsongs_toprequest = 5;
		}
		var html = '<table class="jsam_table">';
		if((this.data_top_songA_id != '') && (maxsongs_toprequest > 0)){
			html = html+ '<tr class="jsam_row_bg0">';
			html = html+ '	<td class="jsam_td">';
			html = html+ '		<span class="jsam_span_artist">'+this.data_top_songA_artist+'</span>';
			html = html+ '		<span class="jsam_span_title">'+this.data_top_songA_title+'</span>';
			html = html+ '	</td>';
			html = html+ '</tr>'; }
		if((this.data_top_songB_id != '') && (maxsongs_toprequest > 1)){
			html = html+ '<tr class="jsam_row_bg1">';
			html = html+ '	<td class="jsam_td">';
			html = html+ '		<span class="jsam_span_artist">'+this.data_top_songB_artist+'</span>';
			html = html+ '		<span class="jsam_span_title">'+this.data_top_songB_title+'</span>';
			html = html+ '	</td>';
			html = html+ '</tr>'; }
		if((this.data_top_songC_id != '') && (maxsongs_toprequest > 2)){
			html = html+ '<tr class="jsam_row_bg0">';
			html = html+ '	<td class="jsam_td">';
			html = html+ '		<span class="jsam_span_artist">'+this.data_top_songC_artist+'</span>';
			html = html+ '		<span class="jsam_span_title">'+this.data_top_songC_title+'</span>';
			html = html+ '	</td>';
			html = html+ '</tr>'; }
		if((this.data_top_songD_id != '') && (maxsongs_toprequest > 3)){
			html = html+ '<tr class="jsam_row_bg1">';
			html = html+ '	<td class="jsam_td">';
			html = html+ '		<span class="jsam_span_artist">'+this.data_top_songD_artist+'</span>';
			html = html+ '		<span class="jsam_span_title">'+this.data_top_songD_title+'</span>';
			html = html+ '	</td>';
			html = html+ '</tr>'; }
		if((this.data_top_songE_id != '') && (maxsongs_toprequest > 4)){
			html = html+ '<tr class="jsam_row_bg0">';
			html = html+ '	<td class="jsam_td">';
			html = html+ '		<span class="jsam_span_artist">'+this.data_top_songE_artist+'</span>';
			html = html+ '		<span class="jsam_span_title">'+this.data_top_songE_title+'</span>';
			html = html+ '	</td>';
			html = html+ '</tr>'; }
		if((this.data_top_songF_id != '') && (maxsongs_toprequest > 5)){
			html = html+ '<tr class="jsam_row_bg0">';
			html = html+ '	<td class="jsam_td">';
			html = html+ '		<span class="jsam_span_artist">'+this.data_top_songF_artist+'</span>';
			html = html+ '		<span class="jsam_span_title">'+this.data_top_songF_title+'</span>';
			html = html+ '	</td>';
			html = html+ '</tr>'; }			
		html = html+ '</table>';
		document.getElementById(target).innerHTML = html;
		setTimeout('joosam.ajax_toprequest("'+target+'", "'+reset+'", "'+maxsongs_toprequest+'")', reset);
	},
	/*==========================================================================================/
	/	Function:	ajax_history																/
	/	Used:		Create output for JooSam History module										/
	/	Version:	0001																		/
	/==========================================================================================*/
	ajax_history: function(target, reset, artist, title, maxsongs){
		if(maxsongs == undefined){
			maxsongs = 5;
		}
		var html = '';
		if((this.data_history_songA_id != '') && (maxsongs > 0)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songA_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songA_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songA_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songB_id != '') && (maxsongs > 1)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songB_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songB_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songB_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songC_id != '') && (maxsongs > 2)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songC_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songC_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songC_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songD_id != '') && (maxsongs > 3)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songD_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songD_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songD_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songE_id != '') && (maxsongs > 4)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songE_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songE_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songE_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songF_id != '') && (maxsongs > 5)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songF_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songF_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songF_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songG_id != '') && (maxsongs > 6)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songG_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songG_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songG_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songH_id != '') && (maxsongs > 7)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songH_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songH_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songH_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songI_id != '') && (maxsongs > 8)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songI_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songI_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songI_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_history_songJ_id != '') && (maxsongs > 9)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<th colspan="2" class="jsm_historyDate">'+this.data_history_songJ_played+'</th>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songJ_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_history_songJ_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		document.getElementById(target).innerHTML = html;
		setTimeout('joosam.ajax_history("'+target+'", "'+reset+'", "'+artist+'", "'+title+'", "'+maxsongs+'")', reset);
	},
	/*==========================================================================================/
	/	Function:	ajax_queue																	/
	/	Used:		Create output for JooSam Queue module										/
	/	Version:	0001																		/
	/==========================================================================================*/
	ajax_queue: function(target, reset, artist, title, maxsongs_queue){
		if(maxsongs_queue == undefined){
			maxsongs_queue = 5;
		}
		var html = '';
		if((this.data_queue_songA_id != '') && (maxsongs_queue > 0)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<td rowspan="2" class="jsm_nummerquew">1)</td>';				
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songA_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songA_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_queue_songB_id != '') && (maxsongs_queue > 1)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<td rowspan="2" class="jsm_nummerquew">2)</td>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songB_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songB_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_queue_songC_id != '') && (maxsongs_queue > 2)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<td rowspan="2" class="jsm_nummerquew">3)</td>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songC_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songC_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_queue_songD_id != '') && (maxsongs_queue > 3)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<td rowspan="2" class="jsm_nummerquew">4)</td>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songD_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songD_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_queue_songE_id != '') && (maxsongs_queue > 4)){
			html = html+'<table class="jsm_song_bg0">';
			html = html+'<tr>';
			html = html+'	<td rowspan="2" class="jsm_nummerquew">5)</td>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songE_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songE_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		if((this.data_queue_songF_id != '') && (maxsongs_queue > 5)){
			html = html+'<table class="jsm_song_bg1">';
			html = html+'<tr>';
			html = html+'	<td rowspan="2" class="jsm_nummerquew">6)</td>';
			html = html+'	<td class="jsm_hisArtistLabel">'+artist+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songF_artist+'</td>';
			html = html+'</tr>';
			html = html+'<tr>';
			html = html+'	<td class="jsm_hisArtistLabel">'+title+'</td>';
			html = html+'	<td class="jsm_hisArtistData">'+this.data_queue_songF_title+'</td>';
			html = html+'</tr>';
			html = html+'</table>'; }
		document.getElementById(target).innerHTML = html;
		setTimeout('joosam.ajax_queue("'+target+'", "'+reset+'", "'+artist+'", "'+title+'", "'+maxsongs_queue+'")', reset);
	},
	/*==========================================================================================/
	/	Function:	killdiv																		/
	/	Used:		Close the search box created by JooSam search function by clicking			/
	/				somewhere in the site.														/
	/	Version:	0001																		/
	/==========================================================================================*/
	killdiv: function(e){ var searchdiv = document.getElementById('joosam_search'); if(searchdiv){ var targ; if(!e){ var e = window.event; } if(e.target){ targ = e.target; } else if(e.srcElement){ targ = e.srcElement; } if (targ.nodeType == 3){ targ = targ.parentNode; } var targetID = targ.getAttribute('id'); if(targetID == null){ targ = targ.getParent(); targetID = targ.getAttribute('id'); } if(targetID == null){ targ = targ.getParent(); targetID = targ.getAttribute('id'); } if(targetID == null){ targ = targ.getParent(); targetID = targ.getAttribute('id'); } if(targetID != 'joosam_search'){ var pardiv = searchdiv.getParent(); pardiv.removeChild(searchdiv); } } },
	/*==========================================================================================/
	/	Function:	gosong																		/
	/	Used:		Form-submit by clicking on a song in the search box.						/
	/	Version:	0001																		/
	/==========================================================================================*/
	gosong: function(sid){ document.getElementById(this.conf_validate).value = 'joosam'; document.getElementById(this.conf_pageload).value = 'info'; document.getElementById(this.conf_songid).value = sid; document.getElementById(this.conf_form).submit(); },
	/*==========================================================================================/
	/	Function:	goletter																	/
	/	Used:		Form-submit by clicking on a letter button.									/
	/	Version:	0001																		/
	/==========================================================================================*/
	goletter: function(letter){ document.getElementById(this.conf_validate).value = 'joosam'; document.getElementById(this.conf_searchtype).value = 'letter'; document.getElementById(this.conf_pageload).value = 'list'; document.getElementById(this.conf_pagenum).value = '0'; document.getElementById(this.conf_searchdata).value = letter; document.getElementById(this.conf_form).submit(); },
	/*==========================================================================================/
	/	Function:	gopage																		/
	/	Used:		Form-submit by clicking on a page number or next page.						/
	/	Version:	0001																		/
	/==========================================================================================*/
	gopage: function(page){ document.getElementById(this.conf_validate).value = 'joosam'; document.getElementById(this.conf_pagenum).value = page; document.getElementById(this.conf_task).value = 'setpage'; document.getElementById(this.conf_form).submit(); },
	/*==========================================================================================/
	/	Function:	setpagelimit																/
	/	Used:		Form-submit by clicking on result per page dropdown.						/
	/	Version:	0001																		/
	/==========================================================================================*/
	setpagelimit: function(){ document.getElementById(this.conf_validate).value = 'joosam'; document.getElementById(this.conf_form).submit(); },
	/*==========================================================================================/
	/	Function:	gorequest																	/
	/	Used:		Form-submit by clicking on the request button.								/
	/	Version:	0001																		/
	/==========================================================================================*/
	gorequest: function(sid){ document.getElementById(this.conf_validate).value = 'joosam'; document.getElementById(this.conf_songid).value = sid; document.getElementById(this.conf_pageload).value = 'request'; document.getElementById(this.conf_form).submit(); },
	/*==========================================================================================/
	/	Function:	gobuytrack																	/
	/	Used:		Check link and open new url for buy song									/
	/	Version:	0001																		/
	/==========================================================================================*/
	gobuytrack: function(sid){ var url = document.getElementById('gobuy_track_'+sid).value; if(url != 'error'){ window.open(url); } },
	/*==========================================================================================/
	/	Function:	keycheck																	/
	/	Used:		Blocks the enter key in the JooSam search bot to prevent fals form submit	/
	/	Version:	0001																		/
	/==========================================================================================*/
	keycheck: function(evt){ if(!evt) var evt = window.event; var keydwn = evt.keyCode; if(keydwn == 13){ return false; } }
}
/*==========================================================================================/
/	Type:		- Onload start counter for joosam live module								/
/				- Onmouse up. Check search box and close it if it's up.						/
/	Version:	0001																		/
/==========================================================================================*/
window.onload = joosam.countdown;
document.onmouseup = joosam.killdiv;